﻿using System.Collections.Generic;
using System.Threading.Tasks;
#if !DOT_NET
using Windows.Foundation;
#endif
#if !NETFX_CORE
using System.Windows;

#endif

namespace StyleMVVM.View
{
	/// <summary>
	/// This service gives you easy access to the MessageDialog class as well as creates IMessageDialog wrappers
	/// </summary>
	public interface IMessageBoxService
	{
		/// <summary>
		/// Opens a message box to the user with just the ok button
		/// </summary>
		/// <param name="message">message to display to the user</param>
		void Notify(string message);

		/// <summary>
		/// Opens a message box to the user with just the ok button
		/// </summary>
		/// <param name="message">message to display to the user</param>
		/// <param name="title">title on the message box</param>
		void Notify(string message, string title);

#if NETFX_CORE
		void Notify(string message, string title, string buttonText);
		
		/// <summary>
		/// Show a new message dialog
		/// </summary>
		/// <param name="message"></param>
		/// <returns>returns the command clicked</returns>
		IAsyncOperation<string> Show(string message);
		
		/// <summary>
		/// Show a new message dialog with the specified title and commands
		/// </summary>
		/// <param name="message">message to display</param>
		/// <param name="title">title for the message dialog</param>
		/// <param name="commands">command to show in the dialog</param>
		/// <returns>returns the command that was clicked</returns>
		IAsyncOperation<string> Show(string message, string title, params string[] commands);

		/// <summary>
		/// Creates a new message Dialog object that can be configured then shown
		/// </summary>
		/// <param name="message">message for the dialog</param>
		/// <param name="title">title for the dialog</param>
		/// <returns>returns a new message dialog object that you configure then show</returns>
		IMessageDialog MessageDialog(string message, string title);

		/// <summary>
		/// Show a new message dialog
		/// </summary>
		/// <param name="message"></param>
		/// <returns>returns the command clicked</returns>
		IAsyncOperation<SystemMessageBoxResult> ShowSystemMessageBox(string message);

		/// <summary>
		/// Show a new message dialog with the specified title and commands
		/// </summary>
		/// <param name="message">message to display</param>
		/// <param name="title">title for the message dialog</param>
		/// <param name="commands">command to show in the dialog</param>
		/// <returns>returns the command that was clicked</returns>
		IAsyncOperation<SystemMessageBoxResult> ShowSystemMessageBox(string message, string title, SystemMessageBoxButton button);

#else

		/// <summary>
		/// Show a new message dialog
		/// </summary>
		/// <param name="message"></param>
		/// <returns>returns the command clicked</returns>
		Task<string> Show(string message);

#if DOT_NET
	/// <summary>
	/// 
	/// </summary>
	/// <param name="message"></param>
	/// <param name="title"></param>
	/// <param name="buttonText"></param>
		void Notify(string message, string title, string buttonText);

		/// <summary>
		/// Show a new message dialog with the specified title and commands
		/// </summary>
		/// <param name="message">message to display</param>
		/// <param name="title">title for the message dialog</param>
		/// <param name="commands">command to show in the dialog</param>
		/// <returns>returns the command that was clicked</returns>
		Task<string> Show(string message, string title, params string[] commands);

		/// <summary>
		/// Shows a new message dialog with specified title and commands
		/// </summary>
		/// <param name="message"></param>
		/// <param name="title"></param>
		/// <param name="commands"></param>
		/// <returns></returns>
		Task<MessageBoxCommand> Show(string message,
		                             string title,
		                             MessageBoxCommand command,
		                             params MessageBoxCommand[] commands);

		/// <summary>
		/// Shows a new message dialog with specified title and commands
		/// </summary>
		/// <param name="message"></param>
		/// <param name="title"></param>
		/// <param name="commands"></param>
		/// <returns></returns>
		Task<MessageBoxCommand> Show(string message, string title, IEnumerable<MessageBoxCommand> commands);
#endif

		/// <summary>
		/// Show a new message dialog
		/// </summary>
		/// <param name="message"></param>
		/// <returns>returns the command clicked</returns>
		Task<SystemMessageBoxResult> ShowSystemMessageBox(string message);

		/// <summary>
		/// Show a new message dialog with the specified title and commands
		/// </summary>
		/// <param name="message">message to display</param>
		/// <param name="title">title for the message dialog</param>
		/// <param name="commands">command to show in the dialog</param>
		/// <returns>returns the command that was clicked</returns>
		Task<SystemMessageBoxResult> ShowSystemMessageBox(string message, string title, SystemMessageBoxButton button);
#endif
	}
}